package com.example.md.mddemo.ml.chapter2.perceptrons;

/**
 * Copyright © 2018年 mddemo. All rights reserved.
 *
 * @author 临江仙 hzqiuxm@163.com
 * 阶跃函数
 * @date 2018/11/8 15:49
 * @Since 1.0.0
 */
public final class ActivationFunction {

    public static int step(double x) {
        if (x >= 0) {
            return 1;
        } else {
            return -1;
        }
    }
}
